﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Dummy.Web
{
    public class GameService
    {
        public void error(GameClientCallback callback, string msg)
        {
            string errormessage = msg;
        }

        public void errorcommand(GameClientCallback callback, string command)
        {

        }

        public void clienthello(GameClientCallback callback, string msg, int num)
        {
            //debug test
            //callback("clienthi", msg + "!!!", (num + 3).ToString());
        }

        public void connectgamer(GameClientCallback callback, string gamerName)
        {
            GameData.ConnectGamer(gamerName, callback);
        }

        public void sendinvite(GameClientCallback callback, string gamerName, string toGamerName)
        {
            GameData.SendInvite(gamerName, toGamerName);
        }

        public void acceptinvite(GameClientCallback callback, string gamerName, string fromGamerName)
        {
            GameData.StartGame(gamerName, fromGamerName);
        }

        public void getgamerlist(GameClientCallback callback, string gamerName)
        {
            GameData.GetGamerList(callback, gamerName);
        }

        public void gamermakemove(GameClientCallback callback, string gamerName, int moveI, int moveJ, string IJchar, string word)
        {
            GameData.GamerMakeMove(gamerName, moveI, moveJ, IJchar, word);
        }
    }
}